A memory device of one type stores data in a non-volatile semiconductor memory, such as an SSD (solid state drive). In some cases, a unit data size (a cluster) for accessing the non-volatile semiconductor memory may be different from a unit data size handled by a host. According to one data writing method, a plurality of data sets handled by the host that amounts to the cluster is collectively written in the non-volatile semiconductor memory in order to reduce a workload of the data writing process.
The host may set, in data storage such as memory, a plurality of queues, each of which stores one or more commands to be processed. According to a data writing method, when a series of write commands that amount to a sequential data writing is stored in the plurality of queues, respectively, data associated with the series of write commands, which amount to the cluster, are collectively stored in the non-volatile semiconductor memory.
When commands to write a series of data sets in a common cluster are stored in a certain queue, if a queue from which commands are retrieved is switched to a different queue, the data writing for the present queue may be discontinued in the middle thereof, and for that reason, only data less than the cluster may be written in the non-volatile semiconductor memory. In order to write remaining sets of data, it is necessary to read the written data, and then to write the read data together with the remaining sets of data in the non-volatile semiconductor memory, which may prevent efficient data writing.